import { createApp } from 'vue';

import * as ElementPlusIconsVue from '@element-plus/icons-vue';

import router from './router';

import { QuillEditor } from '@vueup/vue-quill';
import '@vueup/vue-quill/dist/vue-quill.snow.css';

import pinia from '@/stores';

import App from './App.vue';
import '@/assets/main.css';

const app = createApp(App);

// 全局注册 ElementPlus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 注册 Pinia
app.use(pinia);

// 注册路由
app.use(router);

// 注册富文本编辑器
app.component('QuillEditor', QuillEditor);

// 挂载 App
app.mount('#app');
